// filename: import_stdlib.h
// author: enic
// date: 2015-05-06

#pragma once

#ifndef NOMINMAX
	#define NOMINMAX
#endif

#include <iostream>
#include <vector>
#include <cassert>
#include <fstream>
#include <climits>
#include <cstdint>
#include <sstream>
#include <cstring>
#include <string>
#include <algorithm>
#include <atomic>
#include <stack>
#include <functional>
#include <utility>
#include <memory>
#include <mutex>
#include <queue>
#include <map>


typedef unsigned char byte_t;

template <typename TContainer, typename TVal>
void unique_push_back(TContainer& container, TVal& val)
{
	auto iterFind = std::find(container.begin(), container.end(), val);
	if (container.end() != iterFind)
	{
		container.push_back(val);
	}
}

template<typename TContainer, typename TVal>
void quick_safe_remove(TContainer& container, TVal& val)
{
	auto iterEnd = std::remove(container.begin(), container.end(), val);

	container.erase(iterEnd, container.end());
}